<?php
require_once("login/class.session.php");
$onload_function = "init();"
?>


<? require_once("header.php");?>
<script type="text/javascript" src="../javascript/password_check.js"></script>

<div class = "bigbox">
<?php

if($form->num_errors > 0){
  echo '<div class="error box smallbox">' . $form->error("user") . "<br/>" . $form->error("pass") . '</div>';
}
if(isset($_GET['reg']) && $_GET['reg'] == 1) {
  echo '<div class="error box smallbox"> Registration complete. Please login.</div>';
}

?>

		<div class = "box smallbox">
		<table>		
			<form method="post" action="process.php">
        <tr><h2>Welcome Back!</h2></tr>
        <tr>
          <td>Username:</td>
          <td><input type="text" name="user" maxlength="30" value="<? echo $form->value("userlogin"); ?>"></td>
        </tr>
        <tr>
          <td>Password:</td>
          <td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("passlogin"); ?>"></td>
        </tr>
        <tr>
          <td colspan="2" align="left"><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
          <font size="2">Remember me next time     
          <input type="hidden" name="sublogin" value="1">
        </tr>
        <tr>
				<td></td><td><input class = "medium green color_button" type="submit" value="Login" /></td>
			  </tr>
			</form>
		</table>
		</div>
		<div class = "box smallbox">
		<table>
			<form method="post" action="process.php">
        <tr><h2>Register with Us!</h2></tr>
        <tr>
          <td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td>
        </tr>
        <tr>
          <td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td>
        </tr>
        <tr>
          <td>Confirm Password:</td><td><input type="password" name="pass2" maxlength="50" value="<? echo $form->value("pass2"); ?>"></td>
        </tr>
			<tr>	
          <input type="hidden" name="subjoin" value="1">
				  <td></td><td><input class = "medium color_button blue" type="submit" id="pass_submit" value="Register" /></td>
				  
			</tr>
			<tr>
				<td colspan = "3"><span id="pass_reason" class="red"></span></td>
      </tr>
			</form>
		</table>
		</div>

		<div class = "clear"></div>  
  </div>


<?php require_once("footer.php");
